﻿@{
    ViewBag.Title = "Sort";
}
@model IEnumerable<Data.Model.Organize>
<form method="post">
@Html.AntiForgeryToken()
<br />
<div style="width:82%; margin:0 auto; height:auto;" id="sortdiv">
    @{
    foreach(var org in Model)
    {
    <ul class="sortul">
        <input type="hidden" value="@org.ID" name="sort" />
        @org.Name
    </ul>
    }  
    }
</div>
<div style="width:400px; text-align:center; margin:0 auto; margin-top:10px;">
    <input type="submit" class="mybutton" name="save" value="保存排序" />
    <input type="button" class="mybutton" value="返回" onclick="re();" />
</div>
</form>
<script type="text/javascript">
    var win = new RoadUI.Window();
    $(function ()
    {
        @Html.Raw(ViewBag.Script)
        new RoadUI.DragSort($("#sortdiv"));
    });
    function re()
    {
        window.location = "Body" + '@Html.Raw(Request.Url.Query)';
    }
</script>
